<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>会员充值</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- 引入 Bootstrap -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <script src="${pageContext.request.contextPath}/statics/js/jquery-3.6.0.js"></script>
    <style>
        input{
            margin-bottom: 8px;
        }
    </style>
</head>
<body>
<jsp:include   page="menu.jsp" flush="true"/>
<div class="container">
    <div class="row clearfix">
        <div class="col-md-6 column">
            <div class="page-header">
                <h1>
                    <small>会员充值</small>
                </h1>
            </div>
        </div>
    </div>
    <div class="col-md-9 column" style="float: left">
    <form  class="form1" action="${pageContext.request.contextPath}/member/updateMember" method="post">
        <input type="hidden" name="memberID" value="${member.getMemberID()}"/>
        <div class="row">
            <div class="col-md-2 column" >
                会员名字：
            </div>
            <div class="col-md-4 column" >
                <input type="text" name="memberName" id="memberName" value="${member.getMemberName()}" class="form-control" readonly="true"/>
            </div>
            <div class="col-md-3 column">
                <span id="memberName1" style="display:none;color:red">请输入会员名</span>
            </div>
        </div>
        <div style="margin:10px"></div>
        <div class="row">
            <div class="col-md-2 column" >
                身份证号：
            </div>
            <div class="col-md-4 column" >
                <input type="text" name="memberNo" id="memberNo" value="${member.getMemberNo()}" class="form-control" readonly="true">
            </div>
            <div class="col-md-3 column">
                <span id="memberNo1" style="display:none;color:red">请输入身份证号</span>
            </div>
        </div>
        <div style="margin:10px"></div>
        <div class="row">
            <div class="col-md-2 column" >
                性别：
            </div>
            <div class="col-md-4 column" >
                <input type="text" name="memberGender" id="memberGender"  value="${member.getMemberGender()}" class="form-control" readonly="true">
            </div>
            <div class="col-md-3 column">
                <span id="memberGender1" style="display:none;color:red">请输入性别</span>
            </div>
        </div>
        <div style="margin:10px"></div>
        <div class="row">
            <div class="col-md-2 column" >
                密码：
            </div>
            <div class="col-md-4 column" >
                <input type="text" name="memberPwd" id="memberPwd"  value="${member.getMemberPwd()}"  class="form-control" readonly="true">
            </div>
            <div class="col-md-3 column">
                <span id="memberPwd1" style="display:none;color:red">请输入密码</span>
            </div>
        </div>
        <div style="margin:10px"></div>
        <div class="row">
            <div class="col-md-2 column" >
                手机号码：
            </div>
            <div class="col-md-4 column" >
                <input type="text" name="memberMobile" id="memberMobile" value="${member.getMemberMobile()}" class="form-control" readonly="true">
            </div>
            <div class="col-md-3 column">
                <span id="memberMobile1" style="display:none;color:red">请输入手机号码</span>
            </div>
        </div>
        <div style="margin:10px"></div>
        <div class="row">
            <div class="col-md-2 column" >
                网费:
            </div>
            <div class="col-md-4 column" >
                <input type="text" name="memberCost"  id="memberCost" value="${member.getMemberCost()}" class="form-control">
            </div>
            <div class="col-md-3 column">
                <span id="memberCost1" style="display:none;color:red">请输入网费</span>
            </div>
        </div>
        </br>

        </br>
        <input type="button" onclick="checkForm()" value="充值" class="btn btn-primary"/>
    </form>
    </div>
</div>
</body>

<script type="text/javascript">
    var flag5 = true;
    function checkForm(){
        if($("#memberCost").val() == ""){
            $("#memberCost1").show();
            flag5 = false;
        }else{
            $("#memberCost1").hide();
            flag5 = true;
        }
        if(flag5){
            $(".form1").submit();
            return true;
        }else{
            return false;
        }
        return flag;
    }
</script>
</html>